<?php
namespace catchAdmin\storehouse\model\search;

trait TraySearch
{
    public function searchWarehousingIdAttr($query, $value, $data)
    {
        return $query->where('t.warehousing_id', $value);
    }

    public function searchWarehousingSonIdAttr($query, $value, $data)
    {
        return $query->where('t.warehousing_son_id', $value);
    }
    public function searchTrayIdAttr($query, $value, $data)
    {
        return $query->where('t.tray_id', $value);
    }

    public function searchNameAttr($query, $value, $data)
    {
        return $query->where('c.name', $value);
    }

    public function searchArbitraryCodeAttr($query, $value, $data){
        return $query->where('t.tray_id','like',"%$value%");
    }
}
